package Factory.FinalAssemblyFactory;

import Component.Engine.Engine;
import Component.Frame.Frame;
import Component.GearBox.GearBox;
import Component.Tire.Tire;
import Factory.CarFrameFactory.FrameProduce;
import Factory.EngineFactory.CombustionEngineProduce;
import Factory.GearBoxFactory.GearBoxProduce;
import Factory.TireFactory.TireProduce;
import car.OilCar;

public class OilCarProduce {
    private Engine getEngine(){
        System.out.println("[---准备燃油引擎---]");
        return new CombustionEngineProduce().makeEngine();
    } 

    private Tire getTire() {
        System.out.println("[---准备轮胎---]");
        return new TireProduce().makeTire();
    }

    private GearBox getGearBox() {
        System.out.println("[---准备变速箱---]");
        return new GearBoxProduce().makeGearBox();
    }

    private Frame getFrame() {
        System.out.println("[---准备车架---]");
        return new FrameProduce().makeFrame();
    }

    
    public OilCar makeOilCar() {
        getFrame();
       
        getGearBox();
        
        getTire();
        
        getEngine();
        System.out.println("[***正在组装：车架***]");
        System.out.println("[***正在组装：变速箱***]");
        System.out.println("[***正在组装：轮胎***]");
        System.out.println("[***正在组装：引擎***]");
        System.out.println("[***正在进行最后安装***]");
        System.out.println();
        System.out.println("[---燃油车组装完成---]");
        System.out.println();
        return new OilCar();
    }

}
